package com.sloth.bear.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.sloth.bear.constant.CategoryType;
import com.sloth.bear.dto.entity.Category;
import com.sloth.bear.dto.request.CategoryRequest;
import com.sloth.bear.dto.request.DragRequest;
import com.sloth.bear.dto.vo.CategoryDetailsVo;
import com.sloth.bear.dto.vo.CategoryListVo;

import java.util.List;

public interface CategoryService extends IService<Category> {

    /**
     * 创建分类
     */
    CategoryDetailsVo createCategory(CategoryRequest request);

    /**
     * 获取分类树形结构列表
     */
    List<CategoryListVo> listCategory(CategoryType type);

    /**
     * 获取分类详情
     */
    CategoryDetailsVo detailsCategory(Long id);

    /**
     * 更新分类
     */
    CategoryDetailsVo updateCategory(Long id, CategoryRequest request);

    /**
     * 拖拽分类
     */
    void drag(Long id, DragRequest request);

    /**
     * 删除分类
     */
    void deleteCategory(Long id);
}